<template>
  <div class="errorMain">
    <div class="centerMain">
      <img src="../../public/imgs/error.png" />
      <h1>出错啦！</h1>
      <h4>找不到您访问的页面</h4>
      <el-button size="mini" type="primary" @click="goback">
        <span>返回上一页</span>
      </el-button>
    </div>
  </div>
</template>

<script>
import { onMounted, reactive, toRefs } from 'vue'
import { useRouter } from 'vue-router'
import axios from '@/utils/axios'
import { logout } from '../assets/login/tologin'
import { localRemove, pathMap, localGet } from '@/utils'
export default {
  name: 'Header',
  setup() {
    const router = useRouter()
    const state = reactive({
      name: 'ADMIN',
      userInfo: null,
      hasBack: false
    })
    const goback = () => {
      router.go(-1);
    }
    return {
      ...toRefs(state),
      goback
    }
  }
}
</script>

<style scoped>
  .errorMain {
  height: 100%;
  position: relative;
  .centerMain {
    width: 354px;
    height: 240px;
    position: absolute;
    top: 30%;
    left: 50%;
    margin-left: -177px;
    text-align: center;
    img {
      width: 354px;
      height: 131px;
    }
    h1 {
      font-size: 36px;
      margin: 10px 0;
    }
    h4 {
      font-size: 18px;
      color: #999;
      margin-bottom: 20px;
    }
  }
}
</style>